import 'package:xinxuan/vo/user_data_vo.dart';

class UserLoginVo {
  UserData? data;
  UserLoginMeta? meta;

  UserLoginVo({this.data, this.meta});

  UserLoginVo.fromJson(Map<String, dynamic> json) {
    data = json['data'] != null ? new UserData.fromJson(json['data']) : null;
    meta = json['meta'] != null ? new UserLoginMeta.fromJson(json['meta']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    if (this.meta != null) {
      data['meta'] = this.meta!.toJson();
    }
    return data;
  }
}

class UserLoginMeta {
  String? accessToken;
  String? tokenType;
  int? expiresIn;

  UserLoginMeta({this.accessToken, this.tokenType, this.expiresIn});

  UserLoginMeta.fromJson(Map<String, dynamic> json) {
    accessToken = json['access_token'];
    tokenType = json['token_type'];
    expiresIn = json['expires_in'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['access_token'] = this.accessToken;
    data['token_type'] = this.tokenType;
    data['expires_in'] = this.expiresIn;
    return data;
  }
}
